Integrand size = 28, antiderivative size = 91 \[ \int \frac {a+b x^2}{\left (c+d x^2\right ) \sqrt {e+f x^2}} \, dx=-\frac {(b c-a d) \arctan \left (\frac {\sqrt {d e-c f} x}{\sqrt {c} \sqrt {e+f x^2}}\right )}{\sqrt {c} d \sqrt {d e-c f}}+\frac {b \text {arctanh}\left (\frac {\sqrt {f} x}{\sqrt {e+f x^2}}\right )}{d \sqrt {f}} \]
b*arctanh(x*f^(1/2)/(f*x^2+e)^(1/2))/d/f^(1/2)-(-a*d+b*c)*arctan(x*(-c*f+d *e)^(1/2)/c^(1/2)/(f*x^2+e)^(1/2))/d/c^(1/2)/(-c*f+d*e)^(1/2)
Time = 0.23 (sec) , antiderivative size = 111, normalized size of antiderivative = 1.22 \[ \int \frac {a+b x^2}{\left (c+d x^2\right ) \sqrt {e+f x^2}} \, dx=\frac {\frac {(b c-a d) \arctan \left (\frac {c \sqrt {f}+d x \left (\sqrt {f} x-\sqrt {e+f x^2}\right )}{\sqrt {c} \sqrt {d e-c f}}\right )}{\sqrt {c} \sqrt {d e-c f}}-\frac {b \log \left (-\sqrt {f} x+\sqrt {e+f x^2}\right )}{\sqrt {f}}}{d} \]
(((b*c - a*d)*ArcTan[(c*Sqrt[f] + d*x*(Sqrt[f]*x - Sqrt[e + f*x^2]))/(Sqrt [c]*Sqrt[d*e - c*f])])/(Sqrt[c]*Sqrt[d*e - c*f]) - (b*Log[-(Sqrt[f]*x) + S qrt[e + f*x^2]])/Sqrt[f])/d
Time = 0.21 (sec) , antiderivative size = 91, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.179, Rules used = {398, 224, 219, 291, 218}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {a+b x^2}{\left (c+d x^2\right ) \sqrt {e+f x^2}} \, dx\) |
\(\Big \downarrow \) 398 |
\(\displaystyle \frac {b \int \frac {1}{\sqrt {f x^2+e}}dx}{d}-\frac {(b c-a d) \int \frac {1}{\left (d x^2+c\right ) \sqrt {f x^2+e}}dx}{d}\) |
\(\Big \downarrow \) 224 |
\(\displaystyle \frac {b \int \frac {1}{1-\frac {f x^2}{f x^2+e}}d\frac {x}{\sqrt {f x^2+e}}}{d}-\frac {(b c-a d) \int \frac {1}{\left (d x^2+c\right ) \sqrt {f x^2+e}}dx}{d}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {b \text {arctanh}\left (\frac {\sqrt {f} x}{\sqrt {e+f x^2}}\right )}{d \sqrt {f}}-\frac {(b c-a d) \int \frac {1}{\left (d x^2+c\right ) \sqrt {f x^2+e}}dx}{d}\) |
\(\Big \downarrow \) 291 |
\(\displaystyle \frac {b \text {arctanh}\left (\frac {\sqrt {f} x}{\sqrt {e+f x^2}}\right )}{d \sqrt {f}}-\frac {(b c-a d) \int \frac {1}{c-\frac {(c f-d e) x^2}{f x^2+e}}d\frac {x}{\sqrt {f x^2+e}}}{d}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle \frac {b \text {arctanh}\left (\frac {\sqrt {f} x}{\sqrt {e+f x^2}}\right )}{d \sqrt {f}}-\frac {(b c-a d) \arctan \left (\frac {x \sqrt {d e-c f}}{\sqrt {c} \sqrt {e+f x^2}}\right )}{\sqrt {c} d \sqrt {d e-c f}}\) |
-(((b*c - a*d)*ArcTan[(Sqrt[d*e - c*f]*x)/(Sqrt[c]*Sqrt[e + f*x^2])])/(Sqr t[c]*d*Sqrt[d*e - c*f])) + (b*ArcTanh[(Sqrt[f]*x)/Sqrt[e + f*x^2]])/(d*Sqr t[f])
3.1.60.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a, b}, x] && !GtQ[a, 0]
Int[1/(Sqrt[(a_) + (b_.)*(x_)^2]*((c_) + (d_.)*(x_)^2)), x_Symbol] :> Subst [Int[1/(c - (b*c - a*d)*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]
Int[((e_) + (f_.)*(x_)^2)/(((a_) + (b_.)*(x_)^2)*Sqrt[(c_) + (d_.)*(x_)^2]) , x_Symbol] :> Simp[f/b Int[1/Sqrt[c + d*x^2], x], x] + Simp[(b*e - a*f)/ b Int[1/((a + b*x^2)*Sqrt[c + d*x^2]), x], x] /; FreeQ[{a, b, c, d, e, f} , x]
Time = 3.35 (sec) , antiderivative size = 76, normalized size of antiderivative = 0.84
method | result | size |
pseudoelliptic | \(\frac {\frac {\left (a d -b c \right ) \operatorname {arctanh}\left (\frac {c \sqrt {f \,x^{2}+e}}{x \sqrt {\left (c f -d e \right ) c}}\right )}{\sqrt {\left (c f -d e \right ) c}}+\frac {b \,\operatorname {arctanh}\left (\frac {\sqrt {f \,x^{2}+e}}{x \sqrt {f}}\right )}{\sqrt {f}}}{d}\) | \(76\) |
default | \(\frac {b \ln \left (\sqrt {f}\, x +\sqrt {f \,x^{2}+e}\right )}{d \sqrt {f}}-\frac {\left (-a d +b c \right ) \ln \left (\frac {-\frac {2 \left (c f -d e \right )}{d}-\frac {2 f \sqrt {-c d}\, \left (x +\frac {\sqrt {-c d}}{d}\right )}{d}+2 \sqrt {-\frac {c f -d e}{d}}\, \sqrt {\left (x +\frac {\sqrt {-c d}}{d}\right )^{2} f -\frac {2 f \sqrt {-c d}\, \left (x +\frac {\sqrt {-c d}}{d}\right )}{d}-\frac {c f -d e}{d}}}{x +\frac {\sqrt {-c d}}{d}}\right )}{2 \sqrt {-c d}\, d \sqrt {-\frac {c f -d e}{d}}}-\frac {\left (a d -b c \right ) \ln \left (\frac {-\frac {2 \left (c f -d e \right )}{d}+\frac {2 f \sqrt {-c d}\, \left (x -\frac {\sqrt {-c d}}{d}\right )}{d}+2 \sqrt {-\frac {c f -d e}{d}}\, \sqrt {\left (x -\frac {\sqrt {-c d}}{d}\right )^{2} f +\frac {2 f \sqrt {-c d}\, \left (x -\frac {\sqrt {-c d}}{d}\right )}{d}-\frac {c f -d e}{d}}}{x -\frac {\sqrt {-c d}}{d}}\right )}{2 \sqrt {-c d}\, d \sqrt {-\frac {c f -d e}{d}}}\) | \(352\) |
1/d*((a*d-b*c)/((c*f-d*e)*c)^(1/2)*arctanh(c*(f*x^2+e)^(1/2)/x/((c*f-d*e)* c)^(1/2))+b/f^(1/2)*arctanh((f*x^2+e)^(1/2)/x/f^(1/2)))
Leaf count of result is larger than twice the leaf count of optimal. 161 vs. \(2 (75) = 150\).
Time = 0.79 (sec) , antiderivative size = 737, normalized size of antiderivative = 8.10 \[ \int \frac {a+b x^2}{\left (c+d x^2\right ) \sqrt {e+f x^2}} \, dx=\left [\frac {\sqrt {-c d e + c^{2} f} {\left (b c - a d\right )} f \log \left (\frac {{\left (d^{2} e^{2} - 8 \, c d e f + 8 \, c^{2} f^{2}\right )} x^{4} + c^{2} e^{2} - 2 \, {\left (3 \, c d e^{2} - 4 \, c^{2} e f\right )} x^{2} - 4 \, {\left ({\left (d e - 2 \, c f\right )} x^{3} - c e x\right )} \sqrt {-c d e + c^{2} f} \sqrt {f x^{2} + e}}{d^{2} x^{4} + 2 \, c d x^{2} + c^{2}}\right ) + 2 \, {\left (b c d e - b c^{2} f\right )} \sqrt {f} \log \left (-2 \, f x^{2} - 2 \, \sqrt {f x^{2} + e} \sqrt {f} x - e\right )}{4 \, {\left (c d^{2} e f - c^{2} d f^{2}\right )}}, -\frac {\sqrt {c d e - c^{2} f} {\left (b c - a d\right )} f \arctan \left (\frac {\sqrt {c d e - c^{2} f} {\left ({\left (d e - 2 \, c f\right )} x^{2} - c e\right )} \sqrt {f x^{2} + e}}{2 \, {\left ({\left (c d e f - c^{2} f^{2}\right )} x^{3} + {\left (c d e^{2} - c^{2} e f\right )} x\right )}}\right ) - {\left (b c d e - b c^{2} f\right )} \sqrt {f} \log \left (-2 \, f x^{2} - 2 \, \sqrt {f x^{2} + e} \sqrt {f} x - e\right )}{2 \, {\left (c d^{2} e f - c^{2} d f^{2}\right )}}, \frac {\sqrt {-c d e + c^{2} f} {\left (b c - a d\right )} f \log \left (\frac {{\left (d^{2} e^{2} - 8 \, c d e f + 8 \, c^{2} f^{2}\right )} x^{4} + c^{2} e^{2} - 2 \, {\left (3 \, c d e^{2} - 4 \, c^{2} e f\right )} x^{2} - 4 \, {\left ({\left (d e - 2 \, c f\right )} x^{3} - c e x\right )} \sqrt {-c d e + c^{2} f} \sqrt {f x^{2} + e}}{d^{2} x^{4} + 2 \, c d x^{2} + c^{2}}\right ) - 4 \, {\left (b c d e - b c^{2} f\right )} \sqrt {-f} \arctan \left (\frac {\sqrt {-f} x}{\sqrt {f x^{2} + e}}\right )}{4 \, {\left (c d^{2} e f - c^{2} d f^{2}\right )}}, -\frac {\sqrt {c d e - c^{2} f} {\left (b c - a d\right )} f \arctan \left (\frac {\sqrt {c d e - c^{2} f} {\left ({\left (d e - 2 \, c f\right )} x^{2} - c e\right )} \sqrt {f x^{2} + e}}{2 \, {\left ({\left (c d e f - c^{2} f^{2}\right )} x^{3} + {\left (c d e^{2} - c^{2} e f\right )} x\right )}}\right ) + 2 \, {\left (b c d e - b c^{2} f\right )} \sqrt {-f} \arctan \left (\frac {\sqrt {-f} x}{\sqrt {f x^{2} + e}}\right )}{2 \, {\left (c d^{2} e f - c^{2} d f^{2}\right )}}\right ] \]
[1/4*(sqrt(-c*d*e + c^2*f)*(b*c - a*d)*f*log(((d^2*e^2 - 8*c*d*e*f + 8*c^2 *f^2)*x^4 + c^2*e^2 - 2*(3*c*d*e^2 - 4*c^2*e*f)*x^2 - 4*((d*e - 2*c*f)*x^3 - c*e*x)*sqrt(-c*d*e + c^2*f)*sqrt(f*x^2 + e))/(d^2*x^4 + 2*c*d*x^2 + c^2 )) + 2*(b*c*d*e - b*c^2*f)*sqrt(f)*log(-2*f*x^2 - 2*sqrt(f*x^2 + e)*sqrt(f )*x - e))/(c*d^2*e*f - c^2*d*f^2), -1/2*(sqrt(c*d*e - c^2*f)*(b*c - a*d)*f *arctan(1/2*sqrt(c*d*e - c^2*f)*((d*e - 2*c*f)*x^2 - c*e)*sqrt(f*x^2 + e)/ ((c*d*e*f - c^2*f^2)*x^3 + (c*d*e^2 - c^2*e*f)*x)) - (b*c*d*e - b*c^2*f)*s qrt(f)*log(-2*f*x^2 - 2*sqrt(f*x^2 + e)*sqrt(f)*x - e))/(c*d^2*e*f - c^2*d *f^2), 1/4*(sqrt(-c*d*e + c^2*f)*(b*c - a*d)*f*log(((d^2*e^2 - 8*c*d*e*f + 8*c^2*f^2)*x^4 + c^2*e^2 - 2*(3*c*d*e^2 - 4*c^2*e*f)*x^2 - 4*((d*e - 2*c* f)*x^3 - c*e*x)*sqrt(-c*d*e + c^2*f)*sqrt(f*x^2 + e))/(d^2*x^4 + 2*c*d*x^2 + c^2)) - 4*(b*c*d*e - b*c^2*f)*sqrt(-f)*arctan(sqrt(-f)*x/sqrt(f*x^2 + e )))/(c*d^2*e*f - c^2*d*f^2), -1/2*(sqrt(c*d*e - c^2*f)*(b*c - a*d)*f*arcta n(1/2*sqrt(c*d*e - c^2*f)*((d*e - 2*c*f)*x^2 - c*e)*sqrt(f*x^2 + e)/((c*d* e*f - c^2*f^2)*x^3 + (c*d*e^2 - c^2*e*f)*x)) + 2*(b*c*d*e - b*c^2*f)*sqrt( -f)*arctan(sqrt(-f)*x/sqrt(f*x^2 + e)))/(c*d^2*e*f - c^2*d*f^2)]
\[ \int \frac {a+b x^2}{\left (c+d x^2\right ) \sqrt {e+f x^2}} \, dx=\int \frac {a + b x^{2}}{\left (c + d x^{2}\right ) \sqrt {e + f x^{2}}}\, dx \]
\[ \int \frac {a+b x^2}{\left (c+d x^2\right ) \sqrt {e+f x^2}} \, dx=\int { \frac {b x^{2} + a}{{\left (d x^{2} + c\right )} \sqrt {f x^{2} + e}} \,d x } \]
Exception generated. \[ \int \frac {a+b x^2}{\left (c+d x^2\right ) \sqrt {e+f x^2}} \, dx=\text {Exception raised: TypeError} \]
Exception raised: TypeError >> an error occurred running a Giac command:IN PUT:sage2:=int(sage0,sageVARx):;OUTPUT:index.cc index_m i_lex_is_greater E rror: Bad Argument Value
Timed out. \[ \int \frac {a+b x^2}{\left (c+d x^2\right ) \sqrt {e+f x^2}} \, dx=\int \frac {b\,x^2+a}{\left (d\,x^2+c\right )\,\sqrt {f\,x^2+e}} \,d x \]